<template>
    <div>
        hello info component
        <button @click="add()">button</button>
    </div>
</template>

<script>
  import  store from '@/store'
  export default {
    name: 'Info',
    store, //引入vuex
    methods:{
        add(){
          console.log('add Event');
          store.commit('increase');//调用vuex组件方法，触发并提交事件
        }
    }
  }
</script>

<style scoped>

</style>
